package com.human.server.controller;

import com.human.server.model.R;
import com.human.server.model.request.KpiReportRequest;
import com.human.server.service.impl.ReportServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/human/report")
public class ReportController {

    @Autowired
    private ReportServiceImpl reportService;

    @RequestMapping("status")
    public R statusReport() {
        return R.success(reportService.statusReport());
    }

    @RequestMapping("kpi")
    public R kpiReport(@RequestBody KpiReportRequest kpiReportRequest) {
        return R.success(reportService.kpiReport(kpiReportRequest));
    }

}
